package cn.edu.pku.ss.situationperceiver;

import java.util.Date;

import org.alljoyn.bus.annotation.Position;
import org.alljoyn.bus.annotation.Signature;

import cn.edu.pku.ss.situationperceiver.ContextData.ContextType;


public class ContextSharingRequest {
	/**
	 * This class defines the data structure of the context request message.
	 * 
	 * Through bus object this message will be delivered to all the peers in the 'contextsharing' session. 
	 * Handlers in ContextSharingService will handle this kind of request when it received one.
	 * 
	 */
	@Position(0)
	public DeviceIdentifier deviceId;
	
	@Position(1)
	public String contextType;
	
	@Position(2)
	public String requestTime;
	
	@Position(3)
	public int expirePeriod;	//seconds
	
	
	
	
	public ContextSharingRequest(DeviceIdentifier deviceId,
			String contextType, String requestTime, int expirePeriod) {
		super();
		this.deviceId = deviceId;
		this.contextType = contextType;
		this.requestTime = requestTime;
		this.expirePeriod = expirePeriod;
	}
	public DeviceIdentifier getDeviceId() {
		return deviceId;
	}
	public void setDeviceId(DeviceIdentifier deviceId) {
		this.deviceId = deviceId;
	}
	public String getContextType() {
		return contextType;
	}
	public void setContextType(String contextType) {
		this.contextType = contextType;
	}
	public int getExpirePeriod() {
		return expirePeriod;
	}
	public void setExpirePeriod(int expirePeriod) {
		this.expirePeriod = expirePeriod;
	}
	
	public String getRequestTime() {
		return requestTime;
	}
	public void setRequestTime(String requestTime) {
		this.requestTime = requestTime;
	}
}
